﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<fmt:setBundle basename="ApplicationMessage" />


<!DOCTYPE html>
<html lang="zh-CN">
<head>

  <%@ include file="/WEB-INF/include/meta.jsp"%>
  <%@ include file="/WEB-INF/include/css.jsp"%>

</head>

<body class="ihg-theme-draft">

  <%@ include file="/WEB-INF/include/header.jsp"%>
  <jsp:include page="/WEB-INF/include/submenu-session.jsp">
    <jsp:param name="currentUrl" value="${ctx.host}/sessions/${session.id}" />
  </jsp:include>

  <div class="container-fluid ihg-container has-ihg-sidemenu">

    <div class="ihg-breadcrumb">
      <ol class="breadcrumb border-breadcrumb">
        <li class="active">Coaching Conversation List</li>
      </ol>
    </div>

    <div class="ihg-content-layout">
    
      <div class="panel panel-default ihg-panel">
        <div class="panel-heading">
          <span class="panel-titles text-success" style="font-size: 13px; font-weight: bold;"><i class="glyphicon glyphicon-th-large" style="top: 2px;"></i>&nbsp;&nbsp;Report</span>
        </div>
        
        <div class="panel-body" style="padding: 15px 0;">
          <div class="form-horizontal ihg-form">
          
            <div class="form-group ihg-form-group">
              <label class="control-label col-xs-3">Personal Report :</label>
              <div class="col-xs-3">
                <p class="form-control-static">
                  <c:choose>
                    <c:when test="${not empty sessionReport.delegateFinalReport}">
                      <a href="${sessionReport.delegateFinalReport}" download="学员报告.zip">Download</a>
                    </c:when>
                    <c:otherwise>-</c:otherwise>
                  </c:choose>
                </p>
              </div>
              <label class="control-label col-xs-3">Coach :</label>
              <div class="col-xs-3">
                <c:choose>
                  <c:when test="${not empty delegateAttributes && not empty delegateAttributes['delegate-coach']}">
                    <p class="form-control-static">${persist.admin(delegateAttributes['delegate-coach'].value).email}</p>
                  </c:when>
                  <c:otherwise>-</c:otherwise>
                </c:choose>
              </div>
            </div>
            
            <div class="form-group ihg-form-group">
              <label class="control-label col-xs-3">Coaching Plan:</label>
              <div class="col-xs-3">
                <p class="form-control-static">
                  <c:choose>
                    <c:when test="${not empty delegateAttributes['coaching-plan'].value}">
                      <a href="${delegateAttributes['coaching-plan'].value}" download="">Download</a>
                    </c:when>
                    <c:otherwise>-</c:otherwise>
                  </c:choose>
                </p>
              </div>
              <label class="control-label col-xs-3">Delegate :</label>
              <div class="col-xs-3">
                <p class="form-control-static">${delegate.name}-${delegate.email}-${delegate.telephone}</p>
              </div>
            </div>
            
          </div>
        </div>
      </div>

      <table class="table table-striped ihg-table tab-pane" style="margin-top: 15px;">
        <thead>
          <tr>
            <th>CONVERSATION</th>
            <th>CONVERSATION DATE</th>
            <th>UPDATE TIME</th>
            <th>COACH STATUS</th>
            <th>总结心得</th>
          </tr>
        </thead>
        <tbody>
          <c:forEach var="conversation" items="${conversations}">
            <tr>
              <td>${conversation.theme}</td>
              <td><fmt:formatDate value="${conversation.conversationDate}" pattern="yyyy/MM/dd"/></td>
              <td><fmt:formatDate value="${conversation.lastUpdateTime}" pattern="yyyy/MM/dd HH:mm"/></td>
              <td>
                  <label class="label label-${conversation.status.notSubmited ? 'default' : conversation.status.confirmed ? 'success' : 'danger'}" style="display: block; margin: 0 auto; width: 170px;">${conversation.status}</label>
              </td>
              <td><a href="${conversation.attachment}" download="">Download</a></td>
            </tr>
          </c:forEach>
        </tbody>
      </table>
    </div>


  </div>

  <%@ include file="/WEB-INF/include/footer.jsp"%>
  <%@ include file="/WEB-INF/include/script.jsp"%>

</body>
</html>